home *** CD-ROM | disk | FTP | other *** search
- Path: news.mcgill.ca!news
- From: Jean-Philippe C⌠tΘ <jcote1@PO-Box.McGill.CA>
- Newsgroups: comp.lang.c
- Subject: Problem with arrays
- Date: 30 Jan 1996 01:51:06 GMT
- Organization: McGill University Computing Centre
- Message-ID: <4ejtia$6id@sifon.cc.mcgill.ca>
- NNTP-Posting-Host: o-06.das.mcgill.ca
- X-Newsreader: SPRY News 3.03 (SPRY, Inc.)
-
-
- Hello everyone,
-
- I'm currently writing a program using tries to store words. For bulding my trie, I have defined the following struct:
-
- typedef struct nodebox NODEBOX, *TRIE
-
- struct nodebox{
- { int letters[100];
- TRIE subtree[100];
- };
-
- Then, I declare variables as tries in certain functions. But here's the problem: before inserting any letter in the trie, I expect the
-
- elements in the array letters to be all zeros( '\0' ) like in a normal empty array. But instead, the elements of this arrays are weird
-
- numbers like 25678. It bothers me since I assume that they are '\0' in my insert function. I really don't know what's going wrong.
-
- If you have any idea or solutions, I'd be very graceful if you could e-mail me; I'm stuck.
-
- Thanks a lot.
-
- jcote1@po-box.mcgill.ca
-